<template>
  <div style="width: 100%;height: 100%;">
    <el-table
      :data="tableData"
      highlight-current-row
      stripe
      border
      height="100%"
      :row-style="{ height:'40px' }"
      :cell-style="{ padding:'0px' }"
      :header-cell-style="{ padding: 0, height: '40px'}"
      style="width: 100%">
      <slot v-for="(item,index) in columns">
        <el-table-column
          :key="index"
          :property="item.field"
          :label="item.title"
          :width="item.width"
          show-overflow-tooltip
          sortable>
        </el-table-column>
      </slot>
    </el-table>
  </div>
</template>
<script>
export default {
  name: '',
  components: {},
  data () {
    return {
      tableData: [{
        date: '2016-05-02',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 弄'
      }, {
        date: '2016-05-04',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1517 弄'
      }, {
        date: '2016-05-01',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1519 弄'
      }, {
        date: '2016-05-03',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1516 弄'
      }],
      columns: [
        {
          title: '日期',
          field: 'date'
        },
        {
          title: '姓名',
          field: 'name'
        },
        {
          title: '地址',
          field: 'address'
        }
      ]
    }
  },
  created () {},
  mounted () {},
  methods: {}
}
</script>
<style lang="less" scoped>

</style>
